/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jkoa.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author fikri
 */
@Embeddable
public class JenisKerjaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_jenis_kerja")
    private int idJenisKerja;
    @Basic(optional = false)
    @Column(name = "id_majikan")
    private int idMajikan;

    public JenisKerjaPK() {
    }

    public JenisKerjaPK(int idJenisKerja, int idMajikan) {
        this.idJenisKerja = idJenisKerja;
        this.idMajikan = idMajikan;
    }

    public int getIdJenisKerja() {
        return idJenisKerja;
    }

    public void setIdJenisKerja(int idJenisKerja) {
        this.idJenisKerja = idJenisKerja;
    }

    public int getIdMajikan() {
        return idMajikan;
    }

    public void setIdMajikan(int idMajikan) {
        this.idMajikan = idMajikan;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idJenisKerja;
        hash += (int) idMajikan;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof JenisKerjaPK)) {
            return false;
        }
        JenisKerjaPK other = (JenisKerjaPK) object;
        if (this.idJenisKerja != other.idJenisKerja) {
            return false;
        }
        if (this.idMajikan != other.idMajikan) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jkoa.model.JenisKerjaPK[ idJenisKerja=" + idJenisKerja + ", idMajikan=" + idMajikan + " ]";
    }
    
}
